diff --git a/.claude/skills/mt-add-post/SKILL.md b/.claude/skills/mt-add-post/SKILL.md index 09d8a11..44ffc1b 100644 --- a/.claude/skills/mt-add-post/SKILL.md +++ b/.claude/skills/mt-add-post/SKILL.md @@ -1,11 +1,11 @@ --- name: mt-add-post -description: 'Article handler for the Hugo blog newsletter. Adds a single article/blog URL to today''s newsletter as a main-content entry with a Vietnamese summary. Normally invoked by the mt-add-url meta skill after classification, but can be used directly for a known article URL.' +description: 'Article handler for the Hugo blog newsletter. Adds a single article/blog URL to today''s newsletter as a main-content entry with the original source title and a Vietnamese summary. Normally invoked by the mt-add-url meta skill after classification, but can be used directly for a known article URL.' --- ## Overview -`mt-add-post` is the **article handler**: given a clean article/blog URL, it extracts the content, writes a Vietnamese summary, and inserts it into today's newsletter main content. It does **not** classify or route URLs — that is `mt-add-url`'s job. For YouTube/images/other types, use `mt-add-url`. +`mt-add-post` is the **article handler**: given a clean article/blog URL, it extracts the source title and content, writes a Vietnamese summary, and inserts it into today's newsletter main content. It does **not** classify or route URLs — that is `mt-add-url`'s job. For YouTube/images/other types, use `mt-add-url`. Shared scripts: `scripts/newsletter/`. Shared procedure: `../mt-add-url/references/newsletter-post-mechanics.md` (find/create today's post, newsletter numbering, section insertion, language rules) — **follow it** for all post mechanics. @@ -20,12 +20,12 @@ Trust `route: article`; skip if `duplicate` or not `accessible`. ## Workflow 1. **Post mechanics** — follow `../mt-add-url/references/newsletter-post-mechanics.md` to find/create today's post and (if new) get the newsletter number + apply the template. -2. **Extract** the article title and main content. +2. **Extract** the original article title and main content. Preserve the source title exactly enough to remain recognizable: do not translate/localize it; keep source-language wording, capitalization, punctuation, and proper nouns from metadata (`og:title`, page title, or fetcher frontmatter). 3. **Summarize in Vietnamese** — 1-2 paragraphs, max 300 words, professional tone for junior developers. Optionally add 3-5 key points. 4. **Write** the main-content block and insert it **before** the `### Bonus` section (or append at end of file if there is no Bonus yet — do not create an empty Bonus): ```markdown -## [Tiêu đề bài viết](clean_url) +## [Original article title](clean_url) [Tóm tắt tiếng Việt — tối đa 300 từ] @@ -47,5 +47,6 @@ Trust `route: article`; skip if `duplicate` or not `accessible`. - [ ] Title `"Newsletter #[number]"` (if created) - [ ] Tags include `"AI-Assisted"` - [ ] URL is clean (no tracking params) +- [ ] Heading uses the original source article title, not a Vietnamese translation - [ ] Vietnamese content ≥99%, grammar correct - [ ] Article inserted before the Bonus section diff --git a/.claude/skills/mt-add-url/references/newsletter-post-mechanics.md b/.claude/skills/mt-add-url/references/newsletter-post-mechanics.md index a2e21c8..2a7c88f 100644 --- a/.claude/skills/mt-add-url/references/newsletter-post-mechanics.md +++ b/.claude/skills/mt-add-url/references/newsletter-post-mechanics.md @@ -41,11 +41,12 @@ categories: ["Newsletter"] **Never rewrite the whole `index.md`.** Always insert by anchoring an Edit on an existing string (e.g. `### Bonus`, `**Videos:**`) and prepending/appending around it. Multiple URLs targeting the same day's post must be applied **sequentially** so one edit doesn't clobber another. **Articles go before the `### Bonus` section; Bonus assets go inside it.** +Article headings must use the original source title. Do not translate/localize article titles; keep the source-language wording, capitalization, punctuation, and proper nouns from metadata (`og:title`, page title, or fetcher frontmatter). Summaries and key points stay Vietnamese. To insert an article safely, anchor the Edit on `### Bonus` and prepend: ``` old_string: "### Bonus" -new_string: "## [New Article Title](clean_url)\n\n[Summary]\n\n**Điểm chính:**\n- ...\n\n### Bonus" +new_string: "## [Original Article Title](clean_url)\n\n[Summary]\n\n**Điểm chính:**\n- ...\n\n### Bonus" ``` If the post has **no `### Bonus`** yet: diff --git a/codex/prompts/mt-add-post.md b/codex/prompts/mt-add-post.md index a442c7c..6186da7 100644 --- a/codex/prompts/mt-add-post.md +++ b/codex/prompts/mt-add-post.md @@ -1,11 +1,11 @@ --- -description: Add an article/blog URL to today's newsletter main content (Vietnamese summary) +description: Add an article/blog URL to today's newsletter main content (original title, Vietnamese summary) argument-hint: --- # Add an article to the newsletter (article handler) -Given a clean article/blog URL, extract its content, write a Vietnamese summary, and insert it into today's newsletter main content. Does not classify/route — for YouTube/images/other use `/prompts:mt-add-url`. +Given a clean article/blog URL, extract its original title and content, write a Vietnamese summary, and insert it into today's newsletter main content. Does not classify/route — for YouTube/images/other use `/prompts:mt-add-url`. Article URL: `$ARGUMENTS` @@ -20,11 +20,11 @@ Trust `route: article`; skip if `duplicate` or not `accessible`. ## Workflow 1. **Post mechanics** — follow `.claude/skills/mt-add-url/references/newsletter-post-mechanics.md` to find/create today's post and (if new) get the newsletter number + apply the template. -2. **Extract** the article title and main content. +2. **Extract** the original article title and main content. Preserve the source title: do not translate/localize it; keep source-language wording, capitalization, punctuation, and proper nouns from metadata (`og:title`, page title, or fetcher frontmatter). 3. **Summarize in Vietnamese** — 1-2 paragraphs, max 300 words, professional tone for junior developers. Optionally 3-5 key points. 4. **Insert** the main-content block **before** the `### Bonus` section (or append at end if no Bonus yet — do not create an empty Bonus): ```markdown -## [Tiêu đề bài viết](clean_url) +## [Original article title](clean_url) [Tóm tắt tiếng Việt — tối đa 300 từ] @@ -44,5 +44,6 @@ Trust `route: article`; skip if `duplicate` or not `accessible`. - [ ] Title `"Newsletter #[number]"` (if created) - [ ] Tags include `"AI-Assisted"` - [ ] URL is clean (no tracking params) +- [ ] Heading uses the original source article title, not a Vietnamese translation - [ ] Vietnamese content ≥99%, grammar correct - [ ] Article inserted before the Bonus section