Skip to content

feat(hooks): ad-grade slogans in five languages + eight writing rules in the hook prompt - #13

Merged
jammyfu merged 4 commits into
mainfrom
feat/ad-slogans
Oct 30, 2026
Merged

jammyfu merged 4 commits into
mainfrom
feat/ad-slogans

Conversation

@jammyfu

@jammyfu jammyfu commented Oct 30, 2026

Copy link
Copy Markdown
Owner

What

Ad-grade hooks. Stacked note: PR #12 is already merged, so this branches off current main (01525b9); no stacking needed.

  • 70 tracked projects: zh-Hans hook = the 70 slogans from slogans_zh.md (kept as tests/fixtures/slogans_zh.md, test asserts they match 1:1). zh-Hant (OpenCC Taiwan wording + manual fixes), en, ja, ko were written as copy with the same meaning and flavour, not literal translation. All within the existing limits (zh 36 cols ≈ 18 chars, en 60, ja 56, ko 60).
  • 59 listed new repos: 43 rewritten under the same rules; 15 pre-activated/cracked-style installer labels and t3dotgg/tstack intentionally keep their flat literal hook (rule 7 / the source text is already plain). routerhubSI/uncensored-ai-api no longer mentions "uncensored" in the hook (rule 7), still in the details.
  • Rules → generator: the 8 writing rules are hooks.WRITING_RULES, embedded in HOOK_RULE and therefore in HOOK_PROMPT; the example is now 「看不懂的程序,让 AI 讲给你听」; prompt asks for copy-written (not word-for-word) versions.
  • Nothing lost: previous hooks are kept as hook_prev (projects.json and inside each translation-library entry, not shown); when the pipeline replaces a hook it also moves the old one to hook_prev. Long descriptions and all translations untouched (PR feat: one-line hook per project in ranking tables (full descriptions kept in docs/DETAILS) #12 survival tests still pass); no re-translation.
  • Tests: slogans 1:1, old hooks kept (tests/fixtures/previous_hooks_baseline.json), all 8 rules in the prompt, length limits for every stored hook in every language, regeneration keeps hook_prev, literal labels set.

Where a slogan adds something not literally in the source (please review)

  • helix: 「补全高亮都现成」: source says built-in LSP + tree-sitter (completion/highlighting is the implication).
  • semgrep: 「提交前」 and grype: 「上线前」: timing not in source.
  • nuclei: 「批量扫」: "bulk" not in source.
  • kubernetes: 「扩容」: scaling not in source ("production-grade container orchestration").
  • terraform: 「改动有据可查」: version history is implied by "as code", not stated.
  • drawio: 「拖拖就画」: dragging not in source.
  • docker/compose: 「写进一个文件」: single file not in source.
  • dbt: 「版本管理和测试」: source says "software engineering practices".
  • kafka: 「稳稳接住」: reliability not stated.
  • jupyter: 「代码结果和说明放在一页」: implied by notebooks.
  • daisyui slogan is 19 characters (rule says ≤18) but 29 columns, fine for the width rule.
  • New-repo hooks: mcd-meal-mate 「不会搭?」 and shipwords 「追到新词」 add the reader-pain framing only; hevnsnt/CVEngine 「从外面看…哪里有洞,并有证据」 paraphrases "external attack surface ... evidence-based validation".

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T18:19:11.830623Z fdad336 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fdad336e0c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/test_hooks.py
"nodedevelopersack/Cubase", "scarletscreengrasp/Uttorent", "twilightstonerestore/Glary-Utilities-Pro"}

def test_listed_repos_are_rewritten_too_except_literal_labels_and_one_already_plain_text(self):
same = {n for n, v in LIB["entries"].items() for e in v.values() if e["hook"] == e["hook_prev"]}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Scope the rewrite assertions to the baseline library entries

When discovery adds a new repository or a new source-description hash, its first newcomer_i18n.put_hook() call creates hook but no hook_prev, because there is no previous hook. This assertion scans every live library entry and consequently raises KeyError: 'hook_prev' after an otherwise successful update; the later loop makes the same assumption. I reproduced this by adding a fresh entry through put_hook() and running this test. In .github/workflows/daily-update.yml, verification runs after discovery and translation but before commit/push, so newly discovered repositories will block publication. Restrict these historical rewrite assertions to the entries pinned in previous_hooks_baseline.json, allowing future entries to have no previous hook.

Useful? React with 👍 / 👎.

@jammyfu
jammyfu merged commit 64e0eae into main Oct 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant